<div data-toast-container id="toasts-container" class="fixed z-50 bottom-[2vh] w-[90vw] right-[5vw] sm:right-[30vw] sm:w-[40vw]">
  <div data-toast-template id="toast-" class="toast z-50 items-center w-full p-3 mb-3 hidden
      bg-[--background-secondary] rounded-lg shadow border-2" 
      role="alert">
      <div data-icon-container class="inline-flex items-center justify-center flex-shrink-0 w-8 h-8">
          <span class="sr-only">Check icon</span>
      </div>
      <div class="ml-3 text-sm font-normal" data-toast-body></div>
      <button type="button" 
        @click="removeToast($event.target)"
        class="ml-auto -mx-1.5 -my-1.5 bg-[--secondary] hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-[--secondary-dark] inline-flex items-center justify-center h-8 w-8" aria-label="Close">
        <span class="sr-only">Close</span>
        <svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
          <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
        </svg>
      </button>
    </div>
  {% for message in messages %}
    <div id="toast-{{message.tags}}" class="toast z-50 flex items-center w-full p-3 mb-3
      bg-[--background-secondary] rounded-lg shadow border-green-500 border-2
      {% if 'warning' in message.tags %}border-yellow-500{% endif %}
      {% if 'danger' in message.tags %}border-red-500{% endif %}"
      role="alert">
      <div 
        class="inline-flex items-center justify-center flex-shrink-0 w-8 h-8
          text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200 
          {% if 'warning' in message.tags %}text-yellow-500 bg-yellow-100 rounded-lg dark:bg-yellow-700 dark:text-yellow-200{% endif %}
          {% if 'danger' in message.tags %}text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200{% endif %}
          ">
        {% if 'success' in message.tags %}
          <svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
            <path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"/>
          </svg>
        {% elif 'warning' in message.tags %}
          <svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
            <path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"/>
          </svg>
        {% elif 'danger' in message.tags %}
          <svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
            <path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z"/>
          </svg>
        {% endif %}
          <span class="sr-only">Check icon</span>
      </div>
      <div class="ml-3 text-sm font-normal" data-toast-body>{{message.message}}</div>
      <button type="button" 
        @click="removeToast($event.target)"
        class="ml-auto -mx-1.5 -my-1.5 bg-[--secondary] hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-[--secondary-dark] inline-flex items-center justify-center h-8 w-8" aria-label="Close">
        <span class="sr-only">Close</span>
        <svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
          <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
        </svg>
      </button>
    </div>
{% endfor %}
</div>
